package com.chaofan.sell.repository;

import com.chaofan.sell.entity.OrderMaster;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * 订单dao
 *
 * @author: Fairy
 * @date: 2021/9/6
 */
public interface OrderMasterRepository extends JpaRepository<OrderMaster, String> {

    /**
     * 通过openid查询订单
     *
     * @param buyerOpenid 待查询的人
     * @param pageable    分页
     * @return 订单page
     */
    Page<OrderMaster> findByBuyerOpenid(String buyerOpenid, Pageable pageable);
}
